using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using LoanApprovalClient.CustomerService;
using LoanApprovalClient.LoanDataService;
using System.Collections.Generic;

namespace LoanApprovalClient.BLQuoteAdmin
{
    public static class BLQuoteAdmin
    {
        public static Customer validateCustomerLogin(string pUserName, string pPassword)
        {
            Customer customer = getCustomerDetails(pUserName);
            if (customer != null)
            {
                if (customer.Password.ToLower() == pPassword.ToLower())
                {
                    return customer;
                }
            }
            return null;
        }

        private static Customer getCustomerDetails(string pCustomerNumber)
        {
            CustomerService.ServiceSoapClient customerservice = new CustomerService.ServiceSoapClient();
            return customerservice.getCustomerDetails(pCustomerNumber);
        }
        public static List<Application> getCustomerApplications(int pCustomerID)
        {
            List<Application> applicationList = new List<Application>();
            LoanDataService.ServiceSoapClient loandataservice = new LoanDataService.ServiceSoapClient();
            //get list of applications from loandata service

            return applicationList;
        }
    }
}
